<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">

    var a=1;
    for (var i = 1; i <=5 ; i++) {
        a*=i;
    }
    alert("五的阶乘"+a);
</script>
</body>
</html>